﻿using System;
using SharpSqlAnalyzer.nodes;

namespace SharpSqlAnalyzer.stmt.oracle
{
	// Token: 0x0200013A RID: 314
	public class TPlsqlCreateTypeBody : TCommonStoredProcedureSqlStatement
	{
		// Token: 0x06000A55 RID: 2645 RVA: 0x00304CEE File Offset: 0x00302EEE
		public TPlsqlCreateTypeBody() : this(EDbVendor.dbvoracle)
		{
		}

		// Token: 0x06000A56 RID: 2646 RVA: 0x00304CF8 File Offset: 0x00302EF8
		public TPlsqlCreateTypeBody(EDbVendor dbvendor) : base(dbvendor)
		{
			this.sqlstatementtype = ESqlStatementType.sstplsql_createtypebody;
		}

		// Token: 0x170001E4 RID: 484
		// (get) Token: 0x06000A57 RID: 2647 RVA: 0x00304D0C File Offset: 0x00302F0C
		public override TObjectName StoredProcedureName
		{
			get
			{
				return this.typeName;
			}
		}

		// Token: 0x170001E5 RID: 485
		// (get) Token: 0x06000A58 RID: 2648 RVA: 0x00304D14 File Offset: 0x00302F14
		// (set) Token: 0x06000A59 RID: 2649 RVA: 0x00304D1C File Offset: 0x00302F1C
		public virtual TObjectName TypeName
		{
			get
			{
				return this.typeName;
			}
			set
			{
				this.typeName = value;
			}
		}

		// Token: 0x06000A5A RID: 2650 RVA: 0x00304D25 File Offset: 0x00302F25
		public override void init(object arg1, object arg2)
		{
			this.typeName = (TObjectName)arg1;
			this.typeName.ObjectType = 27;
			this.stmts = (TStatementListSqlNode)arg2;
		}

		// Token: 0x170001E6 RID: 486
		// (get) Token: 0x06000A5B RID: 2651 RVA: 0x00304D4C File Offset: 0x00302F4C
		public virtual TStatementListSqlNode Stmts
		{
			get
			{
				return this.stmts;
			}
		}

		// Token: 0x06000A5C RID: 2652 RVA: 0x00304D54 File Offset: 0x00302F54
		public override int doParseStatement(TCustomSqlStatement psql)
		{
			if (this.rootNode == null)
			{
				return -1;
			}
			if (base.doParseStatement(psql) != 0)
			{
				return -1;
			}
			TPlsqlCreateTypeBody tplsqlCreateTypeBody = (TPlsqlCreateTypeBody)this.rootNode;
			this.typeName = tplsqlCreateTypeBody.TypeName;
			tplsqlCreateTypeBody.Stmts.doParse(this, ESqlClause.unknown);
			for (int i = 0; i < tplsqlCreateTypeBody.Stmts.size(); i++)
			{
				this.BodyStatements.add(tplsqlCreateTypeBody.Stmts.getStatementSqlNode(i).Stmt);
			}
			return 0;
		}

		// Token: 0x06000A5D RID: 2653 RVA: 0x00304DCE File Offset: 0x00302FCE
		public override void accept(TParseTreeVisitor v)
		{
			v.preVisit(this);
			v.postVisit(this);
		}

		// Token: 0x06000A5E RID: 2654 RVA: 0x00304DDE File Offset: 0x00302FDE
		public override void acceptChildren(TParseTreeVisitor v)
		{
			v.preVisit(this);
			v.postVisit(this);
		}

		// Token: 0x0400127F RID: 4735
		private TObjectName typeName;

		// Token: 0x04001280 RID: 4736
		private TStatementListSqlNode stmts;
	}
}
